<template>
    <panel title="商品添加">
        <goodsadd @success="success"></goodsadd>
    </panel>
</template>

<script>
import goodsadd from './components/goodsunit.vue'
import { goodsaddReq } from '@/api/account.api'
export default {
    components: { goodsadd },
    methods: {
        success(add) {
            console.log(add);
            goodsaddReq(add).then((res) => {
                if (res.data.code == 0) {
                    this.$router.push('/goods/list')
                }
            })
        }
    }

}
</script>

<style lang="less" scoped>

</style>